﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using ClassLibrary;

namespace MyGoogleMap
{
    static class Program
    {
        /// <summary>
        /// Point d'entrée principal de l'application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //Création du traçeur
                //---------------------------------------------------------------------------------------
                Parameters.Values.localPath_Dir_Tmp = System.IO.Path.GetTempPath() + Application.ProductName;

                if (!System.IO.Directory.Exists(Parameters.Values.localPath_Dir_Tmp))
                    System.IO.Directory.CreateDirectory(Parameters.Values.localPath_Dir_Tmp);

                ErrorManager.InitLog();

                //--------------------------------------------------------------------------------------

                Application.Run(new MainForm());
            }
            catch (Exception e)
            {
                ErrorManager.WriteLog("Program.cs", "Main", e);
            }
            finally
            {
                ErrorManager.CloseLog();
                ErrorManager.Clean();
            }
        }
    }
}
